/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.handlers.commands;

import com.hercules.android.receiver.AndroidReceiver;
import com.hercules.android.receiver.model.commands.XRECommand;

/**
 * This interface defines the contract to handle command error.
 * <p>
 * <b>Thread Safety:</b> Implementation should be thread safe or work in a thread safe manner.
 *
 * @author liuliquan, 7realm
 * @version 1.0
 */
public interface XRECommandErrorHandler {
    /**
     * Handle given command error.
     *
     * @param error the error occurred which should be handled by this method
     * @param command the XRE command which causes the error
     * @param receiver the receiver for the XRE application
     * @throws IllegalArgumentException if given command or receiver or error is null
     */
    void processCommandError(XRECommandHandlerException error, XRECommand command, AndroidReceiver receiver);
}